import java.io.BufferedReader;
import java.io.FileReader;

public class RTools20 {

	private static final String source = "data/R.txt";

	public static void main(String[] args) {
		int currentSequence = 0;
		BufferedReader file;
		try {
			String line;
			file = new BufferedReader(new FileReader(source));
			while ((line = file.readLine()) != null) {

				int lineValue = Integer.parseInt(line);
				int m = lineValue % 1024;
				if (m < 0 || m > 1024)
					System.out
							.println("Le message ne n'est pas compris entre 0 et 1023");
				int x = lineValue / 1024;
				if (x == currentSequence) {
					System.out.println("C(OK," + currentSequence + ")");
					int entier = 15 * 1024;
					System.out.println((entier + currentSequence));
					currentSequence++;
				}
			}

			file.close();
		} catch (Exception e) {
			System.out.println("ERROR : Exception while reading file.");
			e.printStackTrace();
		}
	}
}
